package com.woniuxy.mapper;

import com.woniuxy.pojo.DoctorSchedule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author admin
* @description 针对表【doctor_schedule(医生/医院排班表)】的数据库操作Mapper
* @createDate 2025-06-06 15:38:56
* @Entity com.woniuxy.pojo.DoctorSchedule
*/
@Mapper
public interface DoctorScheduleMapper extends BaseMapper<DoctorSchedule> {
    @Select("<script>" +
            "SELECT id FROM doctor_schedule " +
            "WHERE department_id IN " +
            "   <foreach item='id' collection='ids' open='(' separator=',' close=')'>" +
            "       #{id}" +
            "   </foreach>" +
            "</script>")
    List<Integer> findIdsByDepartmentIds(List<Integer> deptIds);
}




